package com.srcptit.java.training.dungvv.btvn1;

import java.util.Scanner;

public class B5_fibo_n {
	public static void main(String []args){
		int n, dem = 2;
		int f0 = 0, f1 = 1;
		int fn = 0;
		Scanner sc = new Scanner(System.in);
		System.out.println("Moi ban nhap so fibo can tim");
		n = sc.nextInt();
		do{
			fn = f0 + f1;
			f0 = f1;
			f1 = fn;
			//System.out.print(fn+"  ");
			dem++;
		}while (dem <= n);
		System.out.println();
		System.out.println(fn);
	}
}
